<template>
    <div class="commingsoon">
        <Filmlist type="commingsoon" :films="films" />
    </div>
</template>

<script>
import axios from 'axios'
import Filmlist from '@/components/Filmlist.vue'

export default {
    data() {
        return {
            films: []
        }
    },
    methods: {
        getcommingsoonfilms() {
            axios.get(`https://m.maizuo.com/gateway?cityId=${this.$store.state.cityid}&pageNum=1&pageSize=10&type=2&k=5990676`, {
                headers: {
                    'X-Host': 'mall.film-ticket.film.list'
                }
            })
                .then(res => res.data)
                .then(res => {
                    this.films = res.data.films
                })
        }
    },
    created() {
        this.getcommingsoonfilms()
    },
    components: { Filmlist },
}
</script>

<style lang="less" scoped></style>